package test;


import java.util.ArrayList;




public class BidObjectHolder {

	private ArrayList<BidObject> bidobjects;
	private static BidObjectHolder instance;
	
	private BidObjectHolder() {
		this.bidobjects = new ArrayList<BidObject>();
	}
	
	public static BidObjectHolder getInstance() {
		if(instance==null) {
			synchronized(instance) {
				if(instance == null) {
					instance = new BidObjectHolder();
				}
			}
		}
		return instance;
	}

	public void add(BidObject bidobject){
		synchronized(this) {
			bidobjects.add(bidobject);
		}
	}
	
	public void remove(BidObject bidobject){
		synchronized(this) {
			bidobjects.remove(bidobject);
		}
	}

	
}
